/*
 * Copyright (c) 2024 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

import tsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig } from 'vitest/config'

export default defineConfig({
    test: {
        include: ['test/**/**.test.ts'],
        coverage: {
            include: ['src/**'],
            exclude: [
                'src/checker/ArkTS-eslint/NoMisusedPromisesCheck.ts',
                'src/checker/ArkTS-eslint/NoInvalidRegexpCheck.ts',
                'src/checker/ArkTS-eslint/NoImpliedEvalCheck.ts',
                'src/checker/performance/NoFuncAsArgForReusableComponentCheck.ts',
                'src/checker/ArkTS-eslint/NoUseBeforeDefineCheck.ts',
                'src/checker/performance/LimitRefreshScopeCheck.ts',
                'src/checker/performance/SetCachedCountForLazyforeachCheck.ts',
                'src/checker/performance/ModuleTopLevelCodeCheck.ts',
            ]
        },
        exclude: [
            'test/unittest/code/NoMisusedPromisesCheck.test.ts',
            'test/unittest/code/NoInvalidRegexpCheck.test.ts',
            'test/unittest/code/NoImpliedEvalCheck.test.ts',
            'test/unittest/code/NoFuncAsArgForReusableComponentCheck.test.ts',
            'test/unittest/code/NoUseBeforeDefineCheck.test.ts',
            'test/unittest/code/LimitRefreshScopeCheck.test.ts',
            'test/unittest/code/SetCachedCountForLazyforeachCheck.test',
            'test/unittest/code/ModuleTopLevelCodeCheck.test.ts',
        ]
    },
    plugins: [
        tsconfigPaths()
    ]
})